package com.banyuan.domain;

import java.util.Date;
import java.util.Objects;

public class Opus {
    private Integer id;
    private String icon;
    private String name;
    private Integer typeId;
    private String typeName;
    private Integer authorId;
    private String userName;
    private String intro;
    private Date createTime;
    private Date updateTime;

    public Opus() {
    }

    public Opus(Integer id, String icon, String name, Integer typeId, String typeName, Integer authorId, String userName, String intro, Date createTime, Date updateTime) {
        this.id = id;
        this.icon = icon;
        this.name = name;
        this.typeId = typeId;
        this.typeName = typeName;
        this.authorId = authorId;
        this.userName = userName;
        this.intro = intro;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Integer getAuthorId() {
        return authorId;
    }

    public void setAuthorId(Integer authorId) {
        this.authorId = authorId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Opus{" +
                "id=" + id +
                ", icon='" + icon + '\'' +
                ", name='" + name + '\'' +
                ", typeId=" + typeId +
                ", typeName='" + typeName + '\'' +
                ", authorId=" + authorId +
                ", userName='" + userName + '\'' +
                ", intro='" + intro + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Opus opus = (Opus) o;
        return Objects.equals(id, opus.id) && Objects.equals(icon, opus.icon) && Objects.equals(name, opus.name) && Objects.equals(typeId, opus.typeId) && Objects.equals(typeName, opus.typeName) && Objects.equals(authorId, opus.authorId) && Objects.equals(userName, opus.userName) && Objects.equals(intro, opus.intro) && Objects.equals(createTime, opus.createTime) && Objects.equals(updateTime, opus.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, icon, name, typeId, typeName, authorId, userName, intro, createTime, updateTime);
    }
}
